home *** CD-ROM | disk | FTP | other *** search
/ Acorn Risc Technologies StrongARM CD-ROM / Acorn Risc Technologies StrongARM CD-ROM.iso / ftp / documents / appnotes / 231_245 / 234c / Text
Encoding:
Text File  |  1996-02-20  |  31.4 KB  |  759 lines

  1. -----------------------------------------------------------------------------
  2. 16th February 1996
  3. -----------------------------------------------------------------------------
  4. Support Group Application Note
  5. Number: 234
  6. Issue: 3.03
  7. Author: DW
  8. -----------------------------------------------------------------------------
  9. Peripheral Interfacing via the Serial Port
  10.  
  11. -----------------------------------------------------------------------------
  12. Notes: 
  13.  
  14. This document describes the hardware configurations of the serial port over
  15. the history of Acorn 32 bit computers, and details some of the software
  16. protocols needed to drive them.
  17. -----------------------------------------------------------------------------
  18. Applicable Hardware: 
  19. All RISC OS and RISC iX computers
  20.  
  21. Related Application Notes: 
  22. 265: Connecting Acorn Computers to the Internet
  23.  
  24. -----------------------------------------------------------------------------
  25. Copyright (C) 1996 Acorn Computers Limited 
  26.  
  27. Every effort has been made to ensure that the information in this leaflet is 
  28. true and correct at the time of printing. However, the products described in
  29. this leaflet are subject to continuous development and improvements and
  30. Acorn Computers Limited reserves the right to change its specifications at
  31. any time. Acorn Computers Limited cannot accept liability for any loss or
  32. damage arising from the use of any information or particulars in this
  33. leaflet. ACORN, ECONET and ARCHIMEDES are trademarks of Acorn Computers
  34. Limited.
  35. -----------------------------------------------------------------------------
  36. Support Group
  37. Acorn Computers Limited
  38. Acorn House
  39. Vision Park
  40. Histon
  41. Cambridge
  42. CB4 4AE                                                  
  43. -----------------------------------------------------------------------------
  44.  
  45.  
  46. Table of Contents
  47.  
  48. Introduction
  49.  
  50. The Hardware Layer
  51.  
  52. Communication via the Serial Port
  53.  
  54. A Note on Baud Rates
  55.  
  56. Communication Protocols and Flow Control
  57.  
  58. Communication with BBC Model B and Master Series Computers
  59.  
  60. Telecommunication Standards and Data Compression
  61.  
  62. The Programmer's Interface to the Serial Port
  63.  
  64. Connecting Printers to the Serial Port
  65.  
  66. Troubleshooting
  67.  
  68. Appendix A: Cable Configurations
  69.  
  70. Appendix B: Useful Contacts
  71.  
  72. Appendix C: RS232 Signals
  73.  
  74. Glossary
  75.  
  76.  
  77. Throughout this Application Note, terms are used which may be unfamiliar to
  78. the reader. Signals are defined in Appendix C, and a Glossary has been
  79. provided which aims to supply sufficient background information.
  80.  
  81.  
  82. Introduction
  83. ------------
  84. A serial port allows data to be transferred between two computers, or a
  85. computer and peripheral device, as a stream of data bits sent one after the
  86. other down a single wire. This is fundamentally different from parallel
  87. communications (commonly used with printers), which transfers data many bits
  88. at a time over a number of wires. Serial communication can be synchronous or
  89. asynchronous.
  90.  
  91. As the practice of serial communication between devices dates from the very
  92. early history of computing, many different standards have sprung up over the
  93. years; today, as a result of this, there is no de-facto software
  94. communication protocol and no de-facto hardware connector. However, there is
  95. a set of standards which most manufacturers tend to agree on; these are the
  96. RS232 physical connector specification and the RS423 signal level electrical
  97. specification.
  98.  
  99. The Hardware Layer
  100. ------------------
  101. The full RS232 standard connector has 25 pins, usually built into a D-type
  102. connector. Most modern computers and peripherals do not implement the full
  103. RS232 standard, but employ the signal specification from the RS423 standard,
  104. again with a D connector. The Acorn serial port is conformant to the RS423
  105. serial port electrical standard.
  106.  
  107. There are two main classifications of RS232 cable; straight-through and
  108. crossover. Broadly speaking, if the cable is linking the computer to a
  109. communications device, such as a modem, then a straight-through cable is
  110. used - in other words, one where the transmit line is connected to the
  111. same-numbered pins at either end of the cable, as is the receive line, etc.
  112. A modem is a piece of Data Communication Equipment (DCE); hence the
  113. straight-through cable is sometimes referred to as "DTE to DCE." 
  114.  
  115. If the cable is connecting the computer to a peripheral such as a printer,
  116. then the transmit line from the computer needs to be connected to the
  117. peripheral's receive line and vice versa; the two lines have to be crossed
  118. over.  A printer, like the computer itself, is a piece of Data Terminal
  119. Equipment (the terminology goes back to the concept of a large computer
  120. which had a number of user-interface terminals connected to it by serial
  121. lines), and so the cross-over cable is sometimes referred to as "DTE to DTE"
  122. or a "null modem" cable.
  123.  
  124. Consult the manufacturer of your peripheral to determine which cable type is
  125. required.
  126.  
  127. Communication via the Serial Port
  128. ---------------------------------
  129. Data is transferred down a serial line in packets, which comprise a data
  130. "word" wrapped up with a "parity" bit  and one or more "stop" bits. The
  131. waveform looks rather like this:
  132.  
  133. <Insert DrawFiles.Fig1>
  134.  
  135. Figure 1: A Typical Serial Data Stream
  136.  
  137. where the "on" and "off" voltages fall  into this range:
  138.  
  139. <Insert DrawFiles.Fig2>
  140.  
  141. Figure 2: Serial Voltage Ranges
  142.  
  143. The format of the packet (number of data bits, type of parity etc) and the
  144. serial baud rate can be set up using the *CONFIGURE BAUD n and *CONFIGURE
  145. DATA n commands from the command line; the following table details the
  146. settings. Consult the documentation supplied with your peripheral to
  147. determine which settings are appropriate.
  148.  
  149. <Insert DrawFiles.Fig3a>
  150. <Insert DrawFiles.Fig3b>
  151.  
  152. Figure 3: Baud Rate and Word Format Configuration Settings
  153.  
  154. eg *CONFIGURE BAUD 7 would make the system default to 9600 baud
  155. communications.
  156.  
  157. Note that baud rates above 19200 are only available on the Risc PC and
  158. A7000; all other baud rates listed above are available on all systems fitted
  159. with RISC OS 3.1 or later. For high baud rates, the transmit and receive
  160. rates must be set to the same value; at low baud rates (1200 and below), a
  161. system timer can be used for the "receive" rate, hence a different receive
  162. rate can be set using *FX7, eg *FX7,3 would set a receive rate of 300 baud.
  163.  
  164. A Note on Baud Rates
  165. --------------------
  166. A common misconception in serial communications concerns the definition of
  167. "baud" as the number of bits transmitted per second (bps), particularly when
  168. used in reference to modems. 
  169.  
  170. The baud rate is the number of changes in signal state per second. The
  171. Public Switched Telephone Network (PSTN) has a nominal bandwidth of 4kHz,
  172. which is filtered to cut off at a lower bound of approximately 300Hz and an
  173. upper bound of approximately 3400Hz. Between these bounds, any tone may be
  174. transmitted. To allow for some interaction between the carrier frequency and
  175. to provide sufficient tonal separation to allow different signal states to
  176. be differentiated, the normal maximum baud rate for a modem works out at
  177. 2400 baud (although slightly higher rates than this are used by some
  178. non-standard modems).
  179.  
  180. To enable a greater bit-per-second transfer rate than would be feasible were
  181. one tonal signal used over the PSTN to contain information describing the
  182. state of one bit, sequences of multiple bits (either 2, 4, 8 or 16 bits) are
  183. mapped onto one signalling element or "symbol" such that the data passing
  184. over the PSTN comprises one discrete tonal state per symbol. The most
  185. widespread of these symbol encoding systems is QAM, or Quadrature Amplitude
  186. Modulation, as used in the 9600 bps Group 3 Fax standard; in QAM, each
  187. combination of phase angle and amplitude represents one of 16 4-bit patterns
  188. so the actual Group 3 Fax baud rate is therefore 9600/4=2400 baud. 
  189.  
  190. At other bps rates, other coding methods allow each line state to represent
  191. an 8, 16 or 32 bit pattern; the actual data transfer rate works out at
  192. (symbols per second)*(bits per symbol)*(word length)/(total packet size in
  193. bits).
  194.  
  195. In short, the "old" definition of the baud (ie as the reciprocal of the
  196. duration of the shortest signalling element) has subtly altered; originally
  197. the original definition was required for Morse code, in which a dot was the
  198. shortest-duration element and a dash had a duration three times as long,
  199. however as all symbols transmitted over PSTN exist for the same time
  200. duration, baud is now equivalent to the number of symbols transmitted per
  201. second.
  202.  
  203. Communication Protocols and Flow Control
  204. ----------------------------------------
  205. Owing to the nature of serial communications, it is necessary to have a
  206. signalling system by which the peripheral can inform the host that it is
  207. present, switched on, and ready to receive data or has data to transmit, and
  208. vice versa. The last two items in this list comprise flow control.
  209.  
  210. Unlike IBM PC compatibles, Acorn machines default to using the DSR line to
  211. flag readiness to transmit, and require the presence of the DCD signal. IBM
  212. PC compatibles use CTS instead of DSR, and do not necessarily use DCD. On
  213. machines fitted with the 82710 or 82711 serial controllers (these machines
  214. being the A3010, A3020, A4000, A5000 and A4), or on machines with the 37665
  215. general peripheral controller (Risc PC and A7000), it is possible to change
  216. which signals are used for flagging in software, using the
  217. SWI"OS_SerialOp",0 command. Thus an IBM compatible cable may be used; the
  218. option to reprogram the serial port in this manner is currently provided by
  219. some serial communications software. If you have a suitable machine and
  220. prefer to use an over-the-counter IBM standard cable rather than resort to
  221. making your own, first check with the supplier of your communications
  222. software that there is an option to reprogram the serial controller.
  223.  
  224. If you have an older Acorn machine (Archimedes 300 series, 440, 400/1
  225. series, 540, R140 or R200 series), you will need to have a cable wired to a
  226. specification based on the figures in Appendix A of this document.
  227.  
  228. The need for flow control and "handshaking," in which the receiving device
  229. verifies the parity bits included in words and can request the re-sending of
  230. a corrupted word, has led to the development of a number of serial
  231. communications protocol standards. These vary in their ease of
  232. implementation, speed and robustness of transfer, and a number of them are
  233. described below.
  234.  
  235. XON / XOFF
  236. This is the earliest software flow control system which is still in use, and
  237. makes use of the flow control characters &11 (XON) and &13 (XOFF). There is
  238. no error checking implemented as standard. XON / XOFF is incompatible with
  239. SLIP and PPP, as they require the full 8 bits of the data word to send
  240. Internet frame data; ie under Internet Protocol, &11 and &13 cannot be
  241. reserved for flow control.
  242.  
  243. XModem
  244. This is probably the most widely available communications protocol, and is
  245. supported by a large number of communications packages on many types of
  246. host. XModem transfers files in blocks of 128 bytes. Each block has a
  247. checksum, or CRC (Cyclic Redundancy Checksum) added to the end, which is
  248. calculated by summing the values of the bytes in the packet and taking a
  249. pair of bits from the sum. From this checksum, the receiving system can
  250. determine whether the packet was corrupted during transmission, and if so,
  251. it can ask the sending system to retransmit that block.  Although fairly
  252. slow in transferring data, XModem will produce reliable transfers.
  253.  
  254. YModem
  255. Based on the same protocol set as XModem, YModem uses 1024 byte packets
  256. wherever possible, and a different system for  packet integrity checking.
  257. Although YModem can fall back on smaller packets where applicable, there is
  258. no backward compatibility with XModem's checksum system.
  259.  
  260. Kermit
  261. This is another packet-oriented serial communication protocol. Developed at
  262. the University of Columbia, the protocol standard is Public Domain, and
  263. hence Kermit ranks with XModem for widespread use. Although fairly intensive
  264. on encoding and checksumming, and hence fairly slow, Kermit connections are
  265. very robust.
  266.  
  267. SLIP 
  268. SLIP provides a point-to-point connection between two devices for the
  269. transmission of Internet datagrams; the devices can be either two computers,
  270. or a computer and an Internet router. SLIP modifies a standard Internet
  271. datagram by appending a special SLIP END character to it, which allows
  272. datagrams to be distinguished as separate. Normal parameters for an
  273. asynchronous lines apply to SLIP; SLIP requires a port configuration of 8
  274. data bits, no parity, and EIA or hardware flow control. SLIP does not
  275. provide any protection against line errors and data corruption, being
  276. reliant on other high-layer protocols for this. Over a particularly
  277. error-prone dialup link, therefore, SLIP on its own would not be
  278. satisfactory. A SLIP system also needs to have its IP address configuration
  279. set every time the SLIP is loaded and configured, as it cannot determine
  280. network addresses dynamically.
  281.  
  282. PPP
  283. The Point-to-Point Protocol has a number of advantages over SLIP; it is
  284. designed to operate both over asynchronous connections and bit-oriented
  285. synchronous systems, can configure connections to a remote network
  286. dynamically, and test that the link is usable. Full information on PPP can
  287. be obtained from Internet RFC 1171 (see Glossary), and RFC 1220 describes
  288. how PPP can be used with remote bridging.
  289.  
  290. Communication with BBC Model B and Master Series Computers
  291. ----------------------------------------------------------
  292. It is possible to transfer data between a 32-bit Acorn computer and an 8 bit
  293. BBC Model B / Master series computer via the Serial Port; the wiring diagram
  294. for the appropriate cable is presented as Figure 9 in Appendix A.
  295.  
  296. If no suitable communications packages are available, it is possible to
  297. transfer data without using one of the  recognised communications protocols;
  298. this is not recommended except in exceptional circumstances and with a very
  299. short cable.
  300.  
  301. On the transmitting system (assumed to be the Model B / Master), issue:
  302.  
  303. *FX8,4
  304. *FX3,1
  305.  
  306. The first call sets the transmission rate to 1200 baud, and the second
  307. selects the serial port as the output device.
  308.  
  309. On the receiving machine, (assumed to be a 32 bit Acorn machine), issue:
  310.  
  311. *FX156,20
  312. *FX7,4
  313. *FX2,1
  314.  
  315. The first command configures the parity and word size appropriately: note
  316. that the Model B defaults to one stop bit per word, whereas the 32 bit range
  317. defaults to two stop bits. The second sets the receive rate to 1200 baud,
  318. and the third causes standard input to be via the serial port.
  319.  
  320. Performing a LIST operation on a BASIC program stored in the BBC's RAM, or a
  321. *TYPE on a plain text file stored on its disc, will cause the program or
  322. text  to be loaded into whichever RISC OS application has the caret on the
  323. receiving machine.
  324.  
  325. Communication is terminated by issuing
  326.  
  327. *FX3,0
  328. *FX2,0
  329.  
  330. on both machines; it is suggested that the receiving machine terminates
  331. communication first.
  332.  
  333. Telecommunication Standards and Data Compression
  334. ------------------------------------------------
  335. The CCITT (European Telecommunication Standards body) has defined a number
  336. of standards for modem-to-modem communications over the PSTN network, and
  337. translation from these standards codes to communication capabilities is
  338. often a point of confusion. The following list covers most of the standards
  339. currently available.
  340.  
  341. V.21 and Bell 103
  342. Specifies 300 bps 2-wire full duplex communications using FSK (Frequency
  343. Shift Keying) modulation schemes. AT&T created the Bell 103 specification
  344. during the days of telephone system monopoly in the USA. The two standards,
  345. V.21 and Bell 103, differ slightly, but all of today's modems support both
  346. V.21 and Bell 103. 
  347.  
  348. V.22 and Bell 212A
  349. CCITT standard for 1200 bps full duplex modems. Specifies 1200 bps 2-wire
  350. full duplex communications using QPSK (Quadrature Phase Shift Keying)
  351. modulation at 600 baud. Again, these two standards differ slightly. 
  352.  
  353. V.22 bis
  354. CCITT standard for 2400 bps full duplex modems. Specifies 2400 bps 2-wire
  355. full duplex communications using a QAM (Quadrature Amplitude Modulation)
  356. scheme at 600 baud.
  357.  
  358. V.23
  359. Specifies an asymmetrical communication scheme which implements 1200 bps
  360. data transmission in one direction, and 75 baud data transmission in a back
  361. channel. This FKS-based standard is popularly used in Europe for
  362. applications which require high data rates in only one direction, eg CET 1 /
  363. 2 / 3 Teletext.
  364.  
  365. V.24 
  366. Specifies a serial interface; analogous to RS232.
  367.  
  368. V.25 and V.25 bis
  369. CCITT standard for auto-dial commands for modems and other auto-dial
  370. devices. Not commonly used, because of the popularity of the Hayes command
  371. set.
  372.  
  373. V.26, V.26 bis and V.26 ter
  374. Specifies half and full duplex leased-line communications at 1200 and 2400
  375. bps. The specifications employ QPSK modulation at 1200 baud. V.26 ter was
  376. the first modem standard to specify echo cancellation.
  377.  
  378. V.27, V.27 bis and V.27 ter
  379. Specifies 4800 bps communications requiring 2 wires for half duplex and 4
  380. wires for full duplex operation. The standards specify QAM modulation at
  381. 1600 baud. The Group 3 Fax standard references V.27 ter as the base
  382. requirement for 2-wire half duplex fax communications.
  383.  
  384. V.29
  385. CCITT standard for 9600 bps half duplex modems. Specifies 9600 bps
  386. communications requiring 2 wires for half duplex operation, and 4 wires for
  387. full duplex. The standard specifies QAM modulation at 2400 baud. Group 3 Fax
  388. standard T.4 references V.29 as an option for fax transmissions faster than
  389. 4800 bps V.29 ter. A high percentage of fax transmissions rely on V.29, but
  390. virtually all fall back on V.29 ter.
  391.  
  392. V.32
  393. CCITT standard for 9600 bps full duplex modems. Specifies 2-wire full duplex
  394. 9600 bps communications using QAM modulation at 2400 baud and echo
  395. cancellation. V.32 modems offer an upgrade path from V.22 bis for
  396. asynchronous dial-up modem applications. V.32 AUTOMODE was recently
  397. published as an annex to V.32, and defines an automatic fall-back capability
  398. which does not support 9600 bps communications.
  399.  
  400. V.33
  401. Specifies 4-wire full duplex and 2-wire half duplex communications at 14400
  402. bps. V.33 employs TCM (Trellis-Coded Modulation). The Group 3 Fax study
  403. group has modified T.4 to include this.
  404.  
  405.  
  406. V.34
  407. The current state of the art in serial communications over PSTN, V.34
  408. specifies full duplex 28800 bps.
  409.  
  410. V.42
  411. Specifies error correction techniques which can be implemented in modems
  412. independently of transmission speed and modulation system. The
  413. recommendation includes LAPM (Link Access Procedures for Modems) and MNP
  414. (Microcom Networking Protocol) 2 to 4 error correction. The CCITT standard
  415. (which is the V.42 specification) utilises MNP4 and LAPM. When a modem makes
  416. a connection, it tries to use LAPM; if the receiving modem does not support
  417. LAPM the connecting modem tries MNP4, and if the receiving modem does not
  418. support MNP4 the system falls back on asynchronous non-error-correcting
  419. communication. LAPM and MNP4 protocol querying and detection is entirely
  420. transparent to the user.
  421.  
  422. V.42 bis and MNP5
  423. This specifies compression algorithms which can be implemented in modems
  424. independently of transmission speed and modulation system. V.42 bis provides
  425. a 4:1 compression ratio, using the Lempel-Ziv algorithm (as used in !Squash
  426. under RISC OS 3). MNP5 uses a combination of dynamic Huffman and run-length
  427. encoding. MNP5 is not a standard as defined by a specific organisation, but
  428. has become a standard in its own right for 2:1 data compression.
  429.  
  430. The Programmer's Interface to the Serial Port
  431. ---------------------------------------------
  432. There is a "raw" device which corresponds to the serial port (this is
  433. serial:); however, writing to the serial port by directly using this device
  434. is deprecated. The approved programmer interface is via the SWI"OS_SerialOp"
  435. call (SWI &57), which is described starting on page 2-459 of the RISC OS 3
  436. Programmer's Reference Manual. Of particular interest is the provision for
  437. implementation of flow control; the serial status word, accessible via
  438. SWI"OS_SerialOp",0 allows XON/XOFF with CTS handshaking, use of DCD or use
  439. of DSR to implement signalling of intent to transmit / receive data. 
  440.  
  441. Unlike IBM compatibles fitted with the 82710 / 82711, Acorn computers
  442. default to the behaviour associated with the 6551 serial controller fitted
  443. in the original Archimedes range. In order to allow an IBM type lead to be
  444. used, bit 1 (ignore DCD) of the serial port status word must be set using
  445. the appropriate SYS"OS_SerialOp",0 mask. However, to produce a robust
  446. program capable of coping with a noisy connection, it is necessary to
  447. periodically reset the status word so that DCD can be checked.  The type of 
  448. cable which is connected may either be selected by a user menu option, or it
  449. is acceptable to check the state of DCD on program startup. 
  450.  
  451. Full details of this status word are listed on Page 2-462 of the RISC OS 3
  452. Programmer's Reference Manual.
  453.  
  454. Connecting Printers to the Serial Port
  455. --------------------------------------
  456. !Printers is capable of sending data to a suitable printer via a serial
  457. link; the printer usually has to be specially configured to receive data in
  458. this manner, and it is suggested that you refer to your printer manual for
  459. information on how the printer's DIP switches must be set and which formats
  460. of serial word it will accept. !Printers must itself be configured according
  461. to the information supplied in the User Guide, and some suitable cable
  462. wiring diagrams are shown in Appendix A. Printers tend to be configured to
  463. the DTE standard, however you should check this with your printer supplier.
  464. It is also worth noting that a cable for this purpose usually has fewer
  465. wires to be soldered, as data is generally only sent in one direction; from
  466. computer to printer.
  467.  
  468. Troubleshooting
  469. ---------------
  470. First of all, make sure that your serial lead and your communications
  471. package are compatible; if you are using an A5000 or later with an IBM type
  472. lead, make sure that your communications package supports reprogramming of
  473. the serial controller.
  474.  
  475. On some modems, the modem takes control of the RI line, and this may cause
  476. an Acorn computer to hang up. The solution to this is to leave Pin 9 (RI) of
  477. the serial port disconnected if such a modem is in use.
  478.  
  479. Sometimes, when handshaking signals become corrupted (this only occasionally
  480. happens over long, unshielded cables in areas where a lot of electrical
  481. equipment is operating), communications will "hang up" in a deadlocked
  482. state. Rather than reset the computer or the peripheral, it is often
  483. possible to "wake up" the peripheral by sending a Break Level. Not to be
  484. confused with an operation involving the Break key on the keyboard, a Break
  485. Level sends a 0V pulse to the RxD pin on the peripheral. A Break Level can
  486. be sent, if your communications package does not already implement it, by
  487. entering BASIC and issuing
  488.  
  489. SYS"OS_SerialOp",2,<duration in centiseconds>
  490.  
  491. eg SYS"OS_SerialOp",2,20 would send a "short break."
  492.  
  493. A "short break" is generally about 0.2 seconds long, and a "long break" can
  494. be as much as 1.5 seconds. It is suggested that a "long break" only be tried
  495. as a last resort before a device reset. Any characters being sent when the
  496. break is issued may be garbled; however, if the break succeeds in waking the
  497. peripheral, a robust communication protocol would simply ask for the last
  498. data packet to be re-transmitted.
  499.  
  500. On computers prior to the Risc PC running RISC OS 3.10, communications may
  501. be unreliable above 9600 baud, depending on the length and impedance of
  502. cable connected. The unreliability appears in the form of occasional "missed
  503. words" when receiving data. 
  504.  
  505. A pair of soft-loadable patch modules, SerialDev and SerialUtil, are
  506. available via Acorn dealers, Acorn Education Centres and bulletin boards,
  507. and may be downloaded via ftp over Internet from ftp.acorn.co.uk. SerialUtil
  508. is applicable for use under RISC OS 3.1 in conjunction with communications
  509. packages written under RISC OS 2, and provides enhanced arbitration of the
  510. claiming of the serial interrupt vector.  SerialDev is a modified version of
  511. the serial port device driver which forms part of RISC OS 3.10, and improves
  512. the interrupt latency of the serial port to give improved communications
  513. reliability at high baud rates (eg 9600 baud). This improved driver was
  514. included as part of RISC OS 3.11.
  515.  
  516. If you think that you may have a hardware fault with your serial port, you
  517. may find it useful to make up a loopback testing plug; using this plug, in
  518. conjunction with serial loopback test software, should pass data straight
  519. from the "transmit" pins to  the "receive" pins. 
  520.  
  521. <Insert DrawFiles.Fig4>
  522.  
  523. Figure 4: Generic  Loopback Test Plug
  524.  
  525. Please note that there are different versions of this Loopback connector,
  526. modified to work correctly with different machines; hence when building a
  527. plug from the parts lists below, use the generic board layout above and
  528. simply omit any components marked as N/F.
  529.  
  530. <Insert DrawFiles.Fig5>
  531.  
  532. Figure 5: Archimedes 300 series and 440  serial loopback parts list                  
  533.  
  534. <Insert DrawFiles.Fig6> 
  535.  
  536. Figure 6: Archimedes 400/1 serial loopback parts list 
  537.  
  538. <Insert DrawFiles.Fig7>
  539.  
  540. Figure 7: A3000, A30n0, A4000, A5000 serial loopback parts list                
  541.  
  542. <Insert DrawFiles.Fig8> 
  543.  
  544. Figure 8: Risc PC 600 serial loopback parts list
  545.                 
  546.  
  547. Appendix A: Cable Configurations
  548. --------------------------------
  549. The pinout of the Serial Port is as follows:
  550.  
  551. <Insert DrawFiles.Fig9>
  552.  
  553. Figure 9: Acorn Serial Port Pinout
  554.  
  555. 9-way serial connectors on other systems generally have the same pinout;
  556. however, it is suggested that you consult the appropriate documentation for
  557. the other system. Some suitable cable configurations for Acorn machines are
  558. shown below; if you make your own cables, ensure that the cable you use is
  559. adequately screened.
  560.  
  561. <Insert DrawFiles.Fig10>
  562.  
  563. Figure 10: DTE to DTE (Acorn computer to Acorn computer)         
  564.  
  565. <Insert DrawFiles.Fig11>
  566.  
  567. Figure 11: DTE to DCE (Acorn computer to 25-pin Modem)
  568.  
  569. <Insert DrawFiles.Fig12>
  570.  
  571. Figure 12: Acorn Computer to IBM PC compatible 
  572.  
  573. <Insert DrawFiles.Fig13> 
  574.  
  575. Figure 13: Acorn 32 bit computer to BBC Model B / Master Series
  576.                    
  577. <Insert DrawFiles.Fig14> 
  578.  
  579. Figure 14: Acorn Computer to Apple LaserWriter
  580.  
  581. A5000s, A4000s, A3020s and A3010s use an 82710 or 82711 peripheral
  582. controller, which provides the driver hardware for the serial port; Risc PCs
  583. and A7000s use a 37665. As these ICs are used in some IBM PC compatibles, it
  584. is possible to software-configure the computer to use the serial port in
  585. exactly the same way as an IBM PC compatible does. However, the system is
  586. pre-configured to behave as an Acorn machine, so Archimedes cables which
  587. require DCD and have flow control via DSR will work correctly without any
  588. reconfiguration.
  589.  
  590. Some software communications packages have an option to reconfigure the
  591. serial port on machines using 82710 / 82711 or 37665 so that IBM-type cables
  592. can be used
  593.  
  594. Appendix B:Useful Contacts
  595. --------------------------
  596. For SLIP modules, which can be used in conjunction with the Acorn TCP / IP
  597. suite on all Acorn 32 bit machines, including the Risc PC:
  598.  
  599. Gnome Computers Limited
  600. 25a Huntingdon Street
  601. St Neots
  602. Cambridgeshire
  603. PE19 1BG
  604.  
  605. Tel: 0480 406164
  606. email: chris@gnome.co.uk
  607.  
  608. For copies of the RS232, RS423 and CCITT standards documents:
  609.  
  610. BSI Standards
  611. Linford Wood
  612. Milton Keynes
  613. MK14 6LE
  614.  
  615. Tel: 0908 221166
  616.  
  617. For Internet RFCs: 
  618. Anonymous FTP to 
  619.  
  620. sunsite.doc.ic.ac.uk 
  621. or
  622. ota.ox.ac.uk
  623.  
  624. These two sites are given as example only, and are convenient owing to their
  625. UK location; RFCs are available on many more Internet sites.
  626.  
  627. Appendix C: RS232 Signals
  628. -------------------------
  629. For completeness, and for use when interfacing Acorn systems to hardware
  630. which uses 25 way serial connectors, there follows a list of the signals
  631. present in the full RS232 serial port specification.
  632.  
  633. <Insert DrawFiles.Fig15> 
  634.  
  635. Figure 15: 25 Way Serial Pinout
  636.  
  637. Pin 1. Prot (Protective Ground)
  638. This will usually form a connection between any metal screening on the cable
  639. and the metal chassis of the computer and peripheral.
  640.  
  641. Pin 2. TXD (Transmitted Data)
  642. This is the line all data is transmitted on. Transmission will only occur if
  643. line 5, CTS, is active.
  644.  
  645. Pin 3. RXD (Received Data)
  646. This is the line all data is received on.
  647.  
  648. Pin 4. RTS (Request To Send)
  649. This is the line which indicates that an RS232 device is ready to transmit
  650. data. In order to find out whether data is expected, a receiving device
  651. tests this line.
  652.  
  653. Pin 5. CTS (Clear To Send)
  654. The state of this line is used to indicate that a device is ready to receive
  655. data transmitted to it by another RS232 device.It is used to inhibit data
  656. transfer until the receiving device is ready to accept it.
  657.  
  658. Pin 6. DSR (Data Set Ready)
  659. This line is used to indicate that a connected RS232 receiving device is
  660. switched on.
  661.  
  662. Pin 7. GND (Signal Ground)
  663. This provides a common reference for both input and output signals on both
  664. systems.
  665.  
  666. Pin 8. DCD (Data Carrier Detect)
  667. This line is used for hardware flow control on Acorn systems, instead of
  668. CTS.
  669.  
  670. Pin 9. Not connected
  671.  
  672. Pin 10. Not connected
  673.  
  674. Pin 11. STF (Select XMT Frequency)
  675.  
  676. Pin 12. dcd (Secondary DCD)
  677.  
  678. Pin 13. cts (Secondary CTS)
  679.  
  680. Pin 14. xmt (Secondary XMT)
  681.  
  682. Pin 15. Xclk (Transmit Clock)
  683.  
  684. Pin 16. rcv (Secondary RCV)
  685.  
  686. Pin 17. Rclk (Receive Clock)
  687.  
  688. Pin 18. Not connected
  689.  
  690. Pin 19. rts (Secondary RTS)
  691.  
  692. Pin 20. DTR (Data Terminal Ready)
  693. This line is used to indicate whether the RS232 transmitting device is
  694. switched on.
  695.  
  696. Pin 21. SQ1 (Signal Quality)
  697.  
  698. Pin 22. RI (Ring Indicator)
  699.  
  700. Pin 23. DRS (Data Rate Select)
  701.  
  702. Pin 24.     (External Transmit Clock)
  703.  
  704. Pin 25. BY (Busy; Standby)
  705.  
  706.  
  707. Glossary
  708. --------
  709. Asynchronous communication: Communication over a serial line where one
  710. device has to "sit and listen" while the other sends data; the two devices
  711. are not able to send data simultaneously.
  712.  
  713. Baud: See "A Note on Baud Rates"
  714.  
  715. DCE: Data Communications Equipment. A piece of equipment which obeys the DCE
  716. specification as laid down in the RS232 standard.  Usually a modem, or other
  717. device which passes information through it to other devices.
  718.  
  719. DTE: Data Terminal Equipment. A piece of hardware such as a computer or a
  720. printer, which obeys the DTE specification as laid down in the RS232
  721. standard, and which generally does not relay data on electronically.
  722.  
  723. FTP: Internet File Transfer Protocol. Used to download data from an FTP
  724. server (usually a UNIX or VMS host), via an FTP client such as the one
  725. supplied as part of the Acorn TCP/IP suite.
  726.  
  727. Hayes Command Set: This is a command protocol used for software control of
  728. many of today's high-specification modems. A Hayes command sequence starts
  729. with the letters AT (short for ATtention), and can be followed by a number
  730. of parameters. A list of Hayes commands is usually supplied with a modem
  731. supporting the command set.
  732.  
  733. Modem: Short for MODulator / DEModulator. A piece of equipment which
  734. converts serial data into audio-ftrequency tones suitable for sending over
  735. the Public Switched Telephone Network (PSTN), and which can take audio data
  736. back in from a remote system and convert it to serial data.
  737.  
  738. Packet: A standard "chunk" of data sent over a serial link. A basic packet
  739. comprises a start bit, a single data word, a parity bit and either one or
  740. two stop bits. Acorn systems default to two stop bits. Communication
  741. protocols generally use larger packets, containing many words per packet.
  742.  
  743. Parity: A bit added onto the end of a word in a serial data packet, which
  744. allows a simple measure of detecting whether a word was received without
  745. being corrupted. Parity comes in two flavours, even and odd; this determines
  746. the type of checksum calculation carried out.
  747.  
  748. RFC: A "Request For Comment" document. These are usually available over the
  749. Internet, and are the standards documents which define Internet protocols.
  750. Two sites which carry many of the RFCs as plain text documents are listed in
  751. the Useful Contacts section.
  752.  
  753. Synchronous Communication: Communication over a serial line where both
  754. parties in the transaction can be sending and receiving data simultaneously.
  755.  
  756. Word: A sequence of bits in a basic serial packet which contains the
  757. "useful" data being transferred. In serial communication, a word is normally
  758. seven or eight bits long.
  759.